/**
 * @author zowie
 * @param {number} seconds
 * @return {string} result  
 */

function humanReadable(seconds) {
  var result = []
  result.push((((seconds % 60).toString())[1]) ? ((seconds % 60) + '') : ('0' + (seconds % 60)))
  result.push((Math.floor(seconds / 60) % 60).toString()[1] ? ((Math.floor(seconds / 60) % 60) + '') : ('0' + (Math.floor(seconds / 60) % 60)))
  result.push((Math.floor(seconds / 3600)).toString()[1] ? ((Math.floor(seconds / 3600)) + '') : ('0' + (Math.floor(seconds / 3600))))
  return result.reverse().join(':')
}

console.log(humanReadable(59))


function humanReadable(seconds) {
  var pad = function (x) { return (x < 10) ? "0" + x : x; }
  return pad(parseInt(seconds / (60 * 60))) + ":" +
    pad(parseInt(seconds / 60 % 60)) + ":" +
    pad(seconds % 60)
}


function humanReadable(seconds) {
  var hours = parseInt(seconds / 3600);
  var minutes = parseInt(seconds / 60) % 60;
  var seconds = seconds % 60;

  var pad = function (val) {
    return val < 10 ? "0" + val : val;
  }

  return pad(hours) + ":" + pad(minutes) + ":" + pad(seconds);
}


function humanReadable(seconds) {
  return [seconds / 3600, seconds % 3600 / 60, seconds % 60].map(function (v) {
    v = Math.floor(v).toString();
    return v.length == 1 ? '0' + v : v;
  }).join(':');
}


function humanReadable(seconds) {
  var HH, MM, SS;
  HH = "0" + Math.floor(seconds / 3600);
  seconds -= HH * 3600;
  MM = "0" + Math.floor(seconds / 60);
  seconds -= MM * 60;
  SS = "0" + seconds;
  return HH.slice(-2) + ":" + MM.slice(-2) + ":" + SS.slice(-2);
}


function humanReadable(seconds) {
  return [(seconds / 3600) | 0, seconds % 3600 / 60, seconds % 3600 % 60].map(n => ('0' + ('' + n | 0)).substr(-2)).join(':')
}

function humanReadable(t) {
  function d(v) { return ('0' + v).slice(-2) }

  var s = t % 60;
  var m = (t / 60 | 0) % 60;
  var h = t / 3600 | 0;

  return d(h) + ':' + d(m) + ':' + d(s);
}


p = n => `0${n}`.slice(-2), humanReadable = (s) => (m = s / 60 | 0, p(m / 60 | 0) + ':' + p(m % 60) + ':' + p(s % 60))


function humanReadable(seconds) {
  const oneMinute = 60
  const oneHour = oneMinute * 60
  const H = ('0' + Math.floor(seconds / oneHour)).slice(-2)
  const M = ('0' + Math.floor(seconds / oneMinute) % 60).slice(-2)
  const S = ('0' + seconds % 60).slice(-2)
  return `${H}:${M}:${S}`
}


function humanReadable(seconds) {
  hh = Math.floor(seconds / 3600).toString();
  mm = Math.floor((seconds - hh * 3600) / 60).toString();
  ss = (seconds % 60).toString();

  hh = Array(3 - hh.length).join('0') + hh;
  mm = Array(3 - mm.length).join('0') + mm;
  ss = Array(3 - ss.length).join('0') + ss;

  return hh + ':' + mm + ':' + ss;
}